import requests
import time
import execjs
headers={
    'User-Agent':'yuanrenxue.project',
    'cookies':'sessionid=s4i5zs85om37balue3mlnhhm2crjaj33'
}
with open('test.js', 'r', encoding='utf-8') as fp:
    jscode = fp.read()
Func=execjs.compile(jscode)
all_sum=0
for page in range(1,6):
    t=int(time.time())*1000
    m=Func.call('get_11',t,1)
    q='1'+'-'+str(t)+'|'
    url='https://match.yuanrenxue.com/api/match/6'
    params={
        'page':str(page),
        'm':m,
        'q':q
    }
    # print(params)
    res=requests.get(url,headers=headers,params=params)
    print(res.json())
    for data in res.json().get('data'):
        all_sum+=data.get('value')+data.get('value')*23
print('总和为',all_sum)